package com.bifang.common.vo.task;

import com.bifang.common.vo.BasePageVO;
import com.bifang.common.vo.CustomApplyingQueryVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import lombok.Data;

/**
 * 运行时任务节点表
 *
 * @author chenzh
 * @since 2020-11-24
 */
@Data
@ApiModel(value = "任务查询对象", description = "运行时任务节点表")
public class TaskQueryVO extends BasePageVO {

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "任务名称")
    private String name;

    @ApiModelProperty(value = "父任务ID")
    private String parentTaskId;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "任务拥有人Id")
    private String owner;

    @ApiModelProperty(value = "经办人 签收人或者委托人id")
    private String assignee;

    @ApiModelProperty(value = "委托状态 PENDING 委托中， RESOLVED已处理")
    private String delegation;

    @ApiModelProperty(value = "优先级")
    private Integer priority;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "创建时间开始")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTimeStart;

    @ApiModelProperty(value = "创建时间结束")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTimeEnd;

    @ApiModelProperty(value = "截止时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dueDate;

    @ApiModelProperty(value = "分类")
    private String category;

    @ApiModelProperty(value = "挂起状态")
    private Integer suspensionState;

    @ApiModelProperty(value = "租户ID")
    private String tenantId;

    @ApiModelProperty(value = "签收时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date claimTime;

    @ApiModelProperty(value = "签收时间开始")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date claimTimeStart;

    @ApiModelProperty(value = "签收时间结束")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date claimTimeEnd;

    @ApiModelProperty(value = "业务类型")
    private String operationType;

    @ApiModelProperty(value = "业务类型批量")
    private List<String> operationTypeList;

    @ApiModelProperty(value = "签收人类型")
    String assigneeType;

    @ApiModelProperty(value = "签收人id")
    String assigneeId;

    @ApiModelProperty(value = "签收人用户id")
    String assigneeUserId;

    @ApiModelProperty(value = "表单key")
    private String formKey;

    @ApiModelProperty(value = "流程节点定义参数id")
    private String flowNodeId;

    @ApiModelProperty(value = "任务实例id")
    private String executionId;

    @ApiModelProperty(value = "流程定义id")
    private String procDefId;

    @ApiModelProperty(value = "流程实例id")
    private String procInstId;

    @ApiModelProperty(value = "申请人类型")
    private String applicantType;

    @ApiModelProperty(value = "申请人id")
    private String applicantId;

    @ApiModelProperty(value = "申请人名称")
    private String applicantName;

    @ApiModelProperty(value = "业务流水号")
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal busNo;

    @ApiModelProperty(value = "任务状态 wait_claim待签收 wait_complete待办 finish 已办")
    private String status;

    @ApiModelProperty(value = "审批意见类型")
    private String commentType;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "任务拥有者类型 1个人 2组织 3角色 4 用户组")
    private String ownerType;

    @ApiModelProperty(value = "任务拥有者类型对应id")
    private String ownerId;

    @ApiModelProperty(value = "环节id")
    private String actId;

    @ApiModelProperty(value = "摘要")
    private String remarks;

    @ApiModelProperty(value = "session中的userId")
    private String sessionUserId;

    @ApiModelProperty(value = "流水号范围列表")
    private List<String> busNoList;

    @ApiModelProperty(value = "个性化参数列表")
    private List<CustomApplyingQueryVO> customApplyingQueryVOList;

    @ApiModelProperty(value = "个性化查询语句")
    private String customSql;

    @ApiModelProperty(value = "个性化查询标记")
    private Boolean customFlag;
}
